// import conSumer from './conSumer/index'
// import orderControl from './orderControl/index'
// import postAge from './postAge/index'
// import productControl from './productControl/index'
const Admin = () => import(/* webpackChunkName: "Admin" */ '@/components/admin/index')
// 统计分析
const StatisticalAnalysis = () => import('@/components/admin/statisticalAnalysis/index')
// 订单分析
const OrderAnalysis = () => import('@/components/admin/statisticalAnalysis/orderAnalysis/orderAnalysis')
// 用户分析
const UserAnalysis = () => import('@/components/admin/statisticalAnalysis/userAnalysis/userAnalysis')
// 空间分析
const SpaceAnalysis = () => import('@/components/admin/statisticalAnalysis/spaceAnalysis/spaceAnalysis')
// **********************************************************************************************************************************
// 管理
const AdminControl = () => import('@/components/admin/adminControl/index')
// 用户列表
const UserControl = () => import('@/components/admin/adminControl/userControl/userControl')
// 用户消费详情
const SeeAllrecord = () => import('@/components/admin/adminControl/userControl/seeAllrecord')
// 空间列表
const SpaceControl = () => import('@/components/admin/adminControl/spaceControl/spaceControl')
// 添加空间
const AddSpace = () => import('@/components/admin/adminControl/spaceControl/addSpace')
// 空间详情
const SpaceDetail = () => import('@/components/admin/adminControl/spaceControl/spaceDetail')
// 修改空间
const IncomeDrtail = () => import('@/components/admin/adminControl/spaceControl/incomeDrtail')
// 订单列表
const OrderControl = () => import('@/components/admin/adminControl/orderControl/orderControl')
// 订单详情
const OrderDetail = () => import('@/components/admin/adminControl/orderControl/orderDetail')
// 卡劵列表
const VoucherControl = () => import('@/components/admin/adminControl/voucherControl/voucherControl')
// 卡劵详情
const VoucherDetail = () => import('@/components/admin/adminControl/voucherControl/voucherDetail')
// 充值列表
const RechargeControl = () => import('@/components/admin/adminControl/rechargeControl/rechargeControl')
// 充值详情
const RechargeDetail = () => import('@/components/admin/adminControl/rechargeControl/rechargeDetail')
// 入驻列表
const ApplicationAdmission = () => import('@/components/admin/adminControl/applicationAdmission/applicationAdmission')
// ****************************************************************************************************************************************
// 设置
const Setting = () => import('@/components/admin/setting/index')
// 权限设置
const PermissionSetting = () => import('@/components/admin/setting/permissionSetting/permissionSetting')
const admin = [{
  path: '/admin',
  component: Admin,
  name: 'admin',
  meta: {
    title: '管理页面'
  },
  redirect: {
    name: 'spaceControl'
  },
  children: [
    {
      path: '/statisticalAnalysis',
      component: StatisticalAnalysis,
      name: 'statisticalAnalysis',
      meta: { title: '统计分析' },
      redirect: {
        name: 'userAnalysis'
      },
      children: [
        {
          path: '/statisticalAnalysis/userAnalysis',
          component: UserAnalysis,
          name: 'userAnalysis',
          meta: { title: '用户分析' }
        },
        {
          path: '/statisticalAnalysis/orderAnalysis',
          component: OrderAnalysis,
          name: 'orderAnalysis',
          meta: { title: '订单分析' }
        },
        {
          path: '/statisticalAnalysis/spaceAnalysis',
          component: SpaceAnalysis,
          name: 'spaceAnalysis',
          meta: { title: '空间分析' }
        }
      ]
    },
    {
      path: 'adminControl',
      component: AdminControl,
      name: 'adminControl',
      meta: { title: '管理' },
      redirect: {
        name: 'spaceControl'
      },
      children: [
        {
          path: '/adminControl/userControl',
          component: UserControl,
          name: 'userControl',
          meta: { title: '用户列表' }
        },
        {
          path: '/adminControl/userControl/seeAllrecord',
          component: SeeAllrecord,
          name: 'userControl/seeAllrecord',
          meta: { title: '用户消费详情' }
        },
        {
          path: '/adminControl/spaceControl',
          component: SpaceControl,
          name: 'spaceControl',
          meta: { title: '空间列表' }
        },
        {
          path: '/adminControl/spaceControl/addSpace',
          component: AddSpace,
          name: 'spaceControl/addSpace',
          meta: { title: '添加空间' }
        },
        {
          path: '/adminControl/spaceControl/spaceDetail',
          component: SpaceDetail,
          name: 'spaceControl/spaceDetail',
          meta: { title: '空间详情' }
        },
        {
          path: '/adminControl/spaceControl/incomeDrtail',
          component: IncomeDrtail,
          name: 'spaceControl/incomeDrtail',
          meta: { title: '修改空间' }
        },
        {
          path: '/adminControl/orderControl',
          component: OrderControl,
          name: 'orderControl',
          meta: { title: '订单列表' }
        },
        {
          path: '/adminControl/orderControl/orderDetail',
          component: OrderDetail,
          name: 'orderControl/orderDetail',
          meta: { title: '订单详情' }
        },
        {
          path: '/adminControl/voucherControl',
          component: VoucherControl,
          name: 'voucherControl',
          meta: { title: '卡劵列表' }
        },
        {
          path: '/adminControl/voucherControl/voucherDetail',
          component: VoucherDetail,
          name: 'voucherControl/voucherDetail',
          meta: { title: '卡劵详情' }
        },
        {
          path: '/adminControl/rechargeControl',
          component: RechargeControl,
          name: 'rechargeControl',
          meta: { title: '充值列表' }
        },
        {
          path: '/adminControl/rechargeControl/rechargeDetail',
          component: RechargeDetail,
          name: 'rechargeControl/rechargeDetail',
          meta: { title: '充值详情' }
        },
        {
          path: '/adminControl/applicationAdmission',
          component: ApplicationAdmission,
          name: 'applicationAdmission',
          meta: { title: '入驻申请' }
        }
      ]
    },
    {
      path: 'setting',
      component: Setting,
      name: 'setting',
      meta: { title: '设置' },
      redirect: {
        name: 'permissionSetting'
      },
      children: [
        {
          path: '/setting/permissionSetting',
          component: PermissionSetting,
          name: 'permissionSetting',
          meta: { title: '权限设置' }
        }
      ]
    }
  ]
}]
export default admin
